<div class="container">
  <ol class="breadcrumb">
    <li><%= link_to 'Home', root_path %></li>
    <li class="active">Organizations</li>
  </ol>
</div>

<div class="container">
  <h1>
    Listing organization users
  </h1>


  <% if @org_users.empty? %>
      <p>

      <div class="alert alert-warning">
        Currently no users are allowed to this organization.
      </div>
      </p>
  <% else %>
      <div class="media">
        <table class="table table-hover">

          <thead>
          <tr>
            <th>#</th>
            <th>Email</th>
            <th>Name</th>
            <th colspan="3"></th>
          </tr>
          </thead>

          <tbody>
          <% i = 1 %>
          <% @org_users.each do |org_user| %>
              <tr>
                <td><%= i %></td>
                <td><%= org_user.email %></td>
                <td><%= org_user.fullName %></td>
                <td><%= link_to 'Remove', org_remove_user_path(org_user.id), method: :delete, :class => "btn btn-xs btn-danger", data: {confirm: 'Are you sure?'} %></td>
              </tr>

              <% i = i + 1 %>
          <% end %>
          </tbody>
        </table>
      </div>
  <% end %>
</div>